<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML>
<link rel="stylesheet" href="/css/head.css"/>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />

<div id="common_head">
	<div id="line1">
		<div id="content">
			<!-- 如果用户没有登陆, 应提示登陆或者是注册 -->
			<c:if test="${empty user_session}">
				<a href="login.action">登录</a>&nbsp;&nbsp;|&nbsp;&nbsp;
				<a href="regist.action">注册</a>
			</c:if>  
			<!-- 如果用户已登录, 应提示欢迎xxx回来 -->
			<c:if test="${!(empty user_session)}">
				欢迎, ${user_session.username} 回来&nbsp;&nbsp;|&nbsp;&nbsp;
				<c:if test="${user_session.role=='admin'}">
					<a href="back/manage.jsp">后台管理</a>&nbsp;&nbsp;|&nbsp;&nbsp;
				</c:if>
				<a href="logout.action">退出登录</a>
			</c:if>
		
		</div>
	</div>
	<div id="line2">
		<a href="${app}/index.jsp"><img id="logo" src="${app}/img/head/logo.png"/></a>
		<input type="text" name=""/>
		<a href="prodList.action?thispage=1&rowperpage=10">
		<input type="button" value="搜索"/>
		</a>
		<span id="goto">
			<a id="goto_order" href="orderList.action">我的订单</a>
			<a id="goto_cart" href="cart.action">我的购物车</a>
		</span>
	</div>
</div>